package com.hannesdorfmann.mosby3.mvp;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.List;
import static org.junit.Assert.*;

public class MvpQueuingBasePresenterTest {

    MvpQueuingBasePresenter mvpQueuingBasePresenter;
    MvpView mvpView;

    @Before
    public void setUp() throws Exception {
        mvpQueuingBasePresenter = new MvpQueuingBasePresenter();
        mvpView = new MvpView() {
            @Override
            public int hashCode() {
                return super.hashCode();
            }
        };
    }

    @Test
    public void onceViewAttached() {
        mvpQueuingBasePresenter.onceViewAttached(new MvpQueuingBasePresenter.ViewAction<MvpView>() {
            @Override
            public void run(MvpView view) {

            }
        });
        assertNotNull(mvpQueuingBasePresenter);
    }

    @Test
    public void attachView() {
        mvpQueuingBasePresenter.attachView(mvpView);
        assertNotNull(mvpQueuingBasePresenter);
    }

    @Test
    public void detachView() {
        mvpQueuingBasePresenter.detachView();
        assertNotNull(mvpQueuingBasePresenter);
    }

    @Test
    public void destroy() {
        mvpQueuingBasePresenter.destroy();
        assertNotNull(mvpQueuingBasePresenter);
    }

}